package day9;

import day5.Student;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;

/**
 * @author oldliu
 * @since 1.0
 */
public class ReadStudent {
    public static void main(String[] args) {
        try {
            ObjectInputStream oin=new ObjectInputStream(new FileInputStream("student.obj"));
            Student o = (Student) oin.readObject();
            oin.close();
            System.out.println("这个学生的信息如下：");
            System.out.println(o);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
